define([],function(){
	var tpl = {};

	tpl.applyTreatScheme = function(){
		return applyTreatScheme();
	}
	tpl.userList = function(){
		return userList();
	}
	tpl.info = function(){
		return info();
	}
	tpl.creatAuthor = function() {
		return creatAuthor()
	}

	var applyTreatScheme = function(){
		return 	'<script id="tpl_patientList_applyTreatScheme" type="text/html">'+
				'	<div class="apply-scheme-wrap">'+
				'		<div class="search-user">'+
				'	    	<div class="input-group">'+
				'	      		<input type="text" id="searchUser" class="form-control" placeholder="根据手机号码或姓名搜索">'+
				'	      		<span class="input-group-btn" id="emptyBtn">'+
				'	        		<button class="btn btn-default" type="button"><i class="fa fa-times"></i></button>'+
				'	      		</span>'+
				'	    	</div>'+
				'			<div id="userList" class="user-list"></div>'+
				'		</div>'+
				'		<div class="apply-scheme-content clearfix">'+
				'			<div id="applySchemeInfo" class="apply-scheme-info">'+
				'				<div class="info-null"><i class="fa fa-user-o"></i></div>'+
				'			</div>'+
				'			<div class="apply-scheme-box">'+
				'				<div class="form-group">'+
				'			    	<label>请为该患者添加诊疗方案</label>'+
				'			    	<select class="form-control">'+
				'						{{each schemes as value i}}'+
				'					  		<option value="{{value.id}}">{{value.scheme_name}}</option>'+
				'						{{/each}}'+
				'					</select>'+
				'			  	</div>'+
				'			  	<button id="applySchemeSubmit" type="submit" class="btn btn-primary">保存</button>'+
				'			</div>'+
				'		</div>'+
				'	</div>'+
				'</script>';
	}
	var userList = function(){
		return 	'<script id="tpl_patientList_userList" type="text/html">'+
				'	{{if list.length > 0}}'+
				'		{{each list as value i}}'+
				'			<div class="item">{{value.userName}} {{if value.gender=="M"}}男{{else}}女{{/if}} {{value.hisNo}}</div>'+
				'		{{/each}}'+
				'	{{else}}'+
				'		<div>暂无</div>'+
				'	{{/if}}'+
				'</script>';
	}
	var info = function(){
		return 	'<script id="tpl_patientList_info" type="text/html">'+
				'	<div><span><i class="fa fa-user"></i>姓名</span>{{userName}}</div>'+
				'	<div><span><i class="fa {{if gender=="M"}}fa-mars{{else}}fa-venus{{/if}}"></i>性别</span>{{if gender=="M"}}男{{else}}女{{/if}}</div>'+
				'	<div><span><i class="fa fa-sun-o"></i>出生日期</span>{{birthday}}</div>'+
				'	<div><span><i class="fa fa-phone"></i>手机号码</span>{{phoneNo}}</div>'+
				'</script>';
	}
	var creatAuthor = function(){
		return 	'<script id="tpl_patientList_creatAuthor" type="text/html">'+
				'	<option value="">全部</option>'+
				'	{{each list as value i}}'+
				'		<option value="{{value.createAuthor}}">{{value.createName}}</option>'+
				'	{{/each}}'+
				'	<option value="1">患者自助</option>'+
				'</script>';
	}

	return tpl;
});